package day17;
import java.util.*;

public class TestArrayListPlus2 {
    public static void main(String[] args){
        ArrayList<Integer> list = new ArrayList<>();

        Collections.addAll(list, 66, 38, 90, 51, 70);

        for(Iterator<Integer> car = list.iterator(); car.hasNext();){
            int score = car.next();
            if(score == 51) car.remove();
            System.out.println(score);
        }

        System.out.println(list);
    }
}
